/*
 Date: 23/09/2025 19:17:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for ad_banner
-- ----------------------------
DROP TABLE IF EXISTS `ad_banner`;
CREATE TABLE `ad_banner` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '广告标题',
  `image` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '广告图',
  `url_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '跳转类型 1URL跳转 2跳转权益升级页面',
  `url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '跳转URL',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态(0.  删除 1. 正常)',
  `client_type` tinyint NOT NULL DEFAULT '1' COMMENT '类型1主播端，2观看端',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=91 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='首页banner表';

-- ----------------------------
-- Records of ad_banner
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for anchor_audience_delete_record
-- ----------------------------
DROP TABLE IF EXISTS `anchor_audience_delete_record`;
CREATE TABLE `anchor_audience_delete_record` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增 ID',
  `user_id` int NOT NULL DEFAULT '0' COMMENT '用户 ID',
  `member_id` int NOT NULL DEFAULT '0' COMMENT '主播 ID',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '删除状态-0 解除 1 已删除',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`),
  KEY `status` (`status`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=48772 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of anchor_audience_delete_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for anchor_invitation_log
-- ----------------------------
DROP TABLE IF EXISTS `anchor_invitation_log`;
CREATE TABLE `anchor_invitation_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播ID',
  `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '超管用户ID',
  `invitation_id` int unsigned NOT NULL DEFAULT '0' COMMENT '邀请表ID',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '邀请状态 (1. 邀请中 2. 邀请成功)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '邀请时间',
  `update_time` int NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='主播邀请超管记录表';

-- ----------------------------
-- Records of anchor_invitation_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for anchor_periodic_verification_sms_record
-- ----------------------------
DROP TABLE IF EXISTS `anchor_periodic_verification_sms_record`;
CREATE TABLE `anchor_periodic_verification_sms_record` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增iD',
  `periodic_verification_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '周期验证表key',
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播ID',
  `send_type` tinyint NOT NULL DEFAULT '0' COMMENT '通知类别：0 默认值；1 t-7的推送，2  t-1的推送，3 t当天的推送',
  `send_status` tinyint NOT NULL DEFAULT '1' COMMENT '发送状态：0 已废弃，1 未发送，2 已发送',
  `send_msg` varchar(255) NOT NULL DEFAULT '' COMMENT '短信发送内容',
  `trigger_send_time` int NOT NULL DEFAULT '0' COMMENT '触发发送时间',
  `send_time` int NOT NULL DEFAULT '0' COMMENT '发送时间',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE COMMENT '用户ID',
  KEY `periodic_verification_key` (`periodic_verification_key`),
  KEY `trigger_send_time` (`trigger_send_time`)
) ENGINE=InnoDB AUTO_INCREMENT=12934 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='定期验证短信发送表';

-- ----------------------------
-- Records of anchor_periodic_verification_sms_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for ban_member
-- ----------------------------
DROP TABLE IF EXISTS `ban_member`;
CREATE TABLE `ban_member` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `member_id` int NOT NULL DEFAULT '0' COMMENT '主播id',
  `complaint_id` int NOT NULL COMMENT '投诉id',
  `time_statrt` int NOT NULL DEFAULT '0' COMMENT '封禁开始时间',
  `time_end` bigint NOT NULL DEFAULT '0' COMMENT '封禁结束时间',
  `content` varchar(255) NOT NULL COMMENT '封禁理由',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '修改时间',
  `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '封禁状态  1 正常封禁 2永久封禁 0 无效',
  `market` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '后台解封备注',
  PRIMARY KEY (`id`),
  KEY `member_id_index` (`member_id`) USING BTREE,
  KEY `complaint_id_index` (`complaint_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1925 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='封禁主播表';

-- ----------------------------
-- Records of ban_member
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for basic_domain_member_allocations
-- ----------------------------
DROP TABLE IF EXISTS `basic_domain_member_allocations`;
CREATE TABLE `basic_domain_member_allocations` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播ID',
  `allocation_status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '分配状态，1开启，2关闭',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`,`allocation_status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1385 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of basic_domain_member_allocations
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for card_transfer
-- ----------------------------
DROP TABLE IF EXISTS `card_transfer`;
CREATE TABLE `card_transfer` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '转让ID，自增主键',
  `type` tinyint NOT NULL DEFAULT '1' COMMENT '1年卡',
  `status` tinyint(1) DEFAULT '0' COMMENT '0未读 1已读',
  `transfer_days` int DEFAULT NULL COMMENT '转让的天数',
  `old_member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '转让用户id',
  `old_uuid` int DEFAULT NULL,
  `old_nickname` varchar(250) DEFAULT NULL COMMENT '转让人昵称',
  `old_head_img` varchar(128) DEFAULT NULL,
  `new_member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '接受用户id',
  `uuid` int DEFAULT NULL,
  `mobile` char(11) DEFAULT NULL,
  `head_img` varchar(128) DEFAULT NULL,
  `new_member_nickname` varchar(100) DEFAULT NULL COMMENT '接收人昵称',
  `old_order_ids` varchar(100) NOT NULL DEFAULT '0' COMMENT '转让关联年卡id',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '转让时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='转让记录表';

-- ----------------------------
-- Records of card_transfer
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for complaint_intervene_process
-- ----------------------------
DROP TABLE IF EXISTS `complaint_intervene_process`;
CREATE TABLE `complaint_intervene_process` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `complaint_id` int NOT NULL COMMENT '投诉ID',
  `notice_user_type` tinyint NOT NULL DEFAULT '0' COMMENT '通知面向人员：0 默认，1通知主播，2通知用户，3平台',
  `process_type` tinyint NOT NULL DEFAULT '0' COMMENT '过程状态，4 主播提供证明，6 用户补充资料',
  `status` tinyint NOT NULL COMMENT '1是开启，2是结束',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `complaint_id` (`complaint_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE,
  KEY `process_type` (`process_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3162 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='平台介入阶段操作表';

-- ----------------------------
-- Records of complaint_intervene_process
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for complaint_sms_record
-- ----------------------------
DROP TABLE IF EXISTS `complaint_sms_record`;
CREATE TABLE `complaint_sms_record` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增iD',
  `complaint_id` int unsigned NOT NULL DEFAULT '0' COMMENT '投诉ID',
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播ID',
  `send_type` tinyint NOT NULL DEFAULT '0' COMMENT '主播通知类别：0 为刚开始；1计时 48 小时后，仍\r\n未开始处理投诉；2 计时 72 小时后，仍\r\n未开始处理投诉',
  `send_msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '短信发送内容',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `complaint_id` (`complaint_id`) USING BTREE COMMENT '投诉表ID索引',
  KEY `member_id` (`member_id`) USING BTREE COMMENT '用户ID'
) ENGINE=InnoDB AUTO_INCREMENT=8138 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of complaint_sms_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for config
-- ----------------------------
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '变量名',
  `group` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '分组',
  `value` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '变量值',
  `desc` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '变量描述',
  `data_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '变量类型 ( 1. string 2. int 3. json 4. bool 5. float 6. array )',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态 (0. 删除 1. 正常)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `status` (`status`) USING BTREE,
  KEY `name` (`name`) USING BTREE,
  KEY `group` (`group`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统配置表';

-- ----------------------------
-- Records of config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for domain_urls
-- ----------------------------
DROP TABLE IF EXISTS `domain_urls`;
CREATE TABLE `domain_urls` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `url` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '域名地址',
  `is_config` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '配置文件是否生成 (1. 已生成 0. 未生成)',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态，1启用，0关闭',
  PRIMARY KEY (`id`),
  KEY `index_status_config` (`is_config`,`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='域名配置基表';

-- ----------------------------
-- Records of domain_urls
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for feedback_type
-- ----------------------------
DROP TABLE IF EXISTS `feedback_type`;
CREATE TABLE `feedback_type` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '反馈类型内容',
  `sort` int unsigned NOT NULL DEFAULT '0' COMMENT '排序(值越大越靠前)',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态(0. 删除 1. 正常)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='反馈类型表';

-- ----------------------------
-- Records of feedback_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for flow_callback_status
-- ----------------------------
DROP TABLE IF EXISTS `flow_callback_status`;
CREATE TABLE `flow_callback_status` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `view_id` int NOT NULL DEFAULT '0' COMMENT '申诉ID',
  `status` int NOT NULL DEFAULT '0' COMMENT '合同状态，1合同创建，2合同签署中，3合同拒签,4合同签署完成，5 合同流签(合同过期)，6合同撤回，8合同待填写，21 解除协议（已解除）',
  `flow_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '合同ID',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  `user_id` int NOT NULL DEFAULT '0' COMMENT '用户ID',
  `sign_url` varchar(255) NOT NULL DEFAULT '' COMMENT '合同地址',
  PRIMARY KEY (`id`),
  KEY `view_id` (`view_id`) USING BTREE,
  KEY `flow_id` (`flow_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='合同状态表';

-- ----------------------------
-- Records of flow_callback_status
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for font_domain_configs
-- ----------------------------
DROP TABLE IF EXISTS `font_domain_configs`;
CREATE TABLE `font_domain_configs` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `domain_url` varchar(255) NOT NULL DEFAULT '' COMMENT '域名',
  `is_default` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '默认状态，1开启，2禁用',
  `allocation_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '分配类型，1自动，0手动',
  `allocationed_num` int NOT NULL DEFAULT '0' COMMENT '已分配数量',
  `max_allocation_num` int NOT NULL DEFAULT '0' COMMENT '最多可分配限额',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态，1开启，2禁用',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  `is_pre` int unsigned NOT NULL DEFAULT '2' COMMENT '环境类型：1预发；2通用',
  PRIMARY KEY (`id`),
  KEY `status` (`status`) USING BTREE,
  KEY `is_default` (`is_default`) USING BTREE,
  KEY `is_pre` (`is_pre`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=293 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='前端域名配置表';

-- ----------------------------
-- Records of font_domain_configs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for huoshan_url
-- ----------------------------
DROP TABLE IF EXISTS `huoshan_url`;
CREATE TABLE `huoshan_url` (
  `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '腾讯点播id',
  `hs_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '火山地址',
  `tx_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '腾讯地址',
  `streamKey` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '流',
  `note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of huoshan_url
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live
-- ----------------------------
DROP TABLE IF EXISTS `live`;
CREATE TABLE `live` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '直播间标题',
  `cover_image` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '直播间封面图',
  `resolution_ratio` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '480' COMMENT '分辨率(480P、720P、1080P)',
  `is_hide_name` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否隐藏用户昵称 (1.不隐藏 2.隐藏)',
  `is_ip_hidden` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'IP是否隐藏 1.不隐藏 2隐藏',
  `is_title_encipher` tinyint(1) NOT NULL DEFAULT '1' COMMENT '直播间名称是否加密 1.不加密 2.加密',
  `is_hide_headimg` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否隐藏用户头像 (1.不隐藏 2.隐藏)',
  `is_region` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否开启地区限制 (1.限制 2.不限制地区)',
  `region_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '地区限制ID (使用逗号分割)',
  `popularity` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间人气值',
  `popularity_type` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '主播人气值设置类型(1. 累计观看人数 2. 累计浏览量 3. 实时在线人数 )',
  `init_people_num` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间初始观众数量 (限制：0 - 10万)',
  `im_groupId` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'IM直播群ID (同群名称)',
  `push_type` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '推流线路 (1. 七牛云 2.阿里云 3. 火山云 4.百度云 )',
  `streamKey` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '直播流名称',
  `srt_push_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'SRT推流协议地址',
  `push_stream_domain` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '推流地址',
  `rtmp_pull_domain` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'RTMP拉流地址',
  `hls_pull_domain` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'HLS拉流地址',
  `hdl_pull_domain` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'HDL拉流地址',
  `sdp_pull_domain` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'sdp拉流地址',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '直播状态(0.未开播 1.开播中 2.已结束 3.已暂停)',
  `order_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '直播间费用',
  `flux` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '直播流量使用-单位MB',
  `audio_transcod_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '腾讯云音频转码费用',
  `live_member_num` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间观众人数',
  `live_comment_num` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间评论数量',
  `live_like_num` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间点赞数量',
  `live_view_num` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间浏览量',
  `live_length_time` int unsigned NOT NULL DEFAULT '0' COMMENT '直播时长',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  `end_time` int unsigned NOT NULL DEFAULT '0' COMMENT '结束时间',
  `live_hot_num` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间人气值 (设置加人气后叠加数量)',
  `is_private` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '设为私密 (1. 开启 2. 关闭)',
  `is_kefu` tinyint(1) DEFAULT '0' COMMENT '是否开启客服，1开启，0不开启',
  `pause_cover_images` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '直播间暂停封面图',
  `is_del` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '是否删除 (1. 正常 2. 删除)',
  `white_switch` tinyint(1) NOT NULL DEFAULT '2' COMMENT '白名单开关(1.开启 2.关闭)',
  `delete_time` int unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
  `fixed_switch` tinyint(1) NOT NULL DEFAULT '1' COMMENT '固定链接开关 1关 2开',
  `share_switch` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '是否允许用户分享(1允许 2拒绝 )',
  `share_category` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '分享类别开关：0 低版本默认；1 管理员/用户都可分享；2 仅管理员可分享',
  `likes_multiple_switch` tinyint(1) NOT NULL DEFAULT '2' COMMENT '点赞倍数(1. 开启 2. 关闭)',
  `likes_multiple` int NOT NULL DEFAULT '1' COMMENT '点赞倍数',
  `is_tourist` tinyint(1) NOT NULL DEFAULT '1' COMMENT '游客身份进入，1不开启，2开启',
  `is_admin_visible` tinyint(1) NOT NULL DEFAULT '1' COMMENT '管理员是否昵称可见，1可见，2不可见',
  `is_admin_avatar_visible` tinyint(1) NOT NULL DEFAULT '1' COMMENT '管理员是否头像可见，1可见，2不可见',
  `live_mode` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '直播模式 (1. 标准直播 2. 低延迟直播)',
  `is_send_coming` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '用户进入直播间提示语 (1. 开启 2. 关闭)',
  `is_send_coming_switch` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '用户进入直播间提示语新增总开关 (1. 开启 2. 关闭)',
  `again_time` int unsigned NOT NULL DEFAULT '0' COMMENT '重新开播时间',
  `invite_switch` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '邀请排行榜显示  (1. 开启 2. 关闭)',
  `tag_user_in_remind` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '标签用户进入直播间提醒 (1. 开启 2. 关闭)',
  `agree_live` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '开播协议(1.已同意 2.未同意)',
  `is_hide_popularity` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否隐藏人气值 (1.不隐藏 2.隐藏)',
  `show_number_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1.热度值 2.访问量',
  `thermal_value` int NOT NULL DEFAULT '0' COMMENT '热度值',
  `is_wechat_oauth` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否开启微信授权信息显示，1是，2否',
  `tourist_watch_time` int NOT NULL DEFAULT '30' COMMENT '游客可观看时长',
  `is_hidden_more_comment` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否隐藏更多评论显示，1是，2否',
  `admin_view_comment_num` int NOT NULL DEFAULT '30' COMMENT '管理员可观看评论数',
  `user_view_comment_num` int NOT NULL DEFAULT '15' COMMENT '普通用户可观看评论数',
  `is_noise_reduction` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否开启智能降噪，1开启，2不开启',
  `fixed_switch_expire_time` int NOT NULL DEFAULT '0' COMMENT '固定链接过期时间，单位天，-2为近一场',
  `live_high_device` int unsigned NOT NULL DEFAULT '0' COMMENT '固定链接过期时间，单位天',
  `hide_name_rule` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '隐藏用户昵称规则',
  `live_mirror_switch` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '镜像开关；0 不开启 1开启',
  `live_chatMic_switch` tinyint NOT NULL DEFAULT '0' COMMENT '直播间连麦功能开关。0 关播，1 开启',
  `live_chatMic_type` tinyint NOT NULL DEFAULT '2' COMMENT '直播连麦参与类型。1 所有人可申请，2 仅主播邀请',
  `chatMic_user_deduction` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '连麦房间音视频费用',
  `chatMic_mix_transcode_deduction` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '连麦功能混流转码的费用',
  `live_playback` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '直播回放 (1.开启 2.关闭)',
  `share_max_participants` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '直播分享人数限制，0或空为不限制，人数范围为 1～99999',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `id` (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `im_groupId` (`im_groupId`) USING BTREE,
  KEY `index_0` (`streamKey`,`member_id`,`push_type`),
  KEY `index_1` (`streamKey`,`member_id`,`status`),
  KEY `status` (`status`,`update_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=601209 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='直播间表';

-- ----------------------------
-- Records of live
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_administrators_log
-- ----------------------------
DROP TABLE IF EXISTS `live_administrators_log`;
CREATE TABLE `live_administrators_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播ID',
  `live_id` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间ID',
  `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '管理员用户ID',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '管理员状态( 1. 管理员 2. 普通用户 3. 超级管理员)',
  `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '操作状态( 1. 设置 2. 解除)',
  `operate_uid` int unsigned NOT NULL DEFAULT '0' COMMENT '操作人员id',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `live_id` (`live_id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=85977 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='管理员操作记录表';

-- ----------------------------
-- Records of live_administrators_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_chat_mics
-- ----------------------------
DROP TABLE IF EXISTS `live_chat_mics`;
CREATE TABLE `live_chat_mics` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `room_id` varchar(255) NOT NULL DEFAULT '' COMMENT '直播房间ID',
  `task_id` varchar(255) NOT NULL DEFAULT '' COMMENT '推流任务进程ID',
  `anthor_uuid` varchar(50) NOT NULL DEFAULT '' COMMENT '主播UUID',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态，1可用，2失效',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `room_id` (`room_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE,
  KEY `task_id` (`task_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4456 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='房间推流任务表';

-- ----------------------------
-- Records of live_chat_mics
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_chatmic_invitation_log
-- ----------------------------
DROP TABLE IF EXISTS `live_chatmic_invitation_log`;
CREATE TABLE `live_chatmic_invitation_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增 ID',
  `live_id` varchar(100) NOT NULL DEFAULT '' COMMENT '直播间ID',
  `user_id` varchar(100) NOT NULL DEFAULT '' COMMENT '用户ID',
  `chatMic_user_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '当前房间的连麦 ID，做数据冗余处理',
  `invitation_key` varchar(100) NOT NULL DEFAULT '' COMMENT '连麦邀请 key',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '连麦状态：0 待邀请；1 已邀请待接受；2 接受邀请连麦；3超时未接受连麦；4 拒绝邀请连麦，5 取消邀请',
  `chatMic_type` tinyint NOT NULL DEFAULT '1' COMMENT '连麦通话类型：1语音连麦；2 视频连麦',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  `latest_status` tinyint NOT NULL DEFAULT '1' COMMENT '数据最新状态 1为最新；2为非最新',
  `invitation_timeout_seconds` int NOT NULL DEFAULT '0' COMMENT '邀请超时时间秒数',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `live_id` (`live_id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE,
  KEY `latest_status` (`latest_status`)
) ENGINE=InnoDB AUTO_INCREMENT=1668 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='直播间邀请连麦数据表';

-- ----------------------------
-- Records of live_chatmic_invitation_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_chatmic_user_online_log
-- ----------------------------
DROP TABLE IF EXISTS `live_chatmic_user_online_log`;
CREATE TABLE `live_chatmic_user_online_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_id` varchar(100) NOT NULL DEFAULT '0' COMMENT '用户ID',
  `live_id` varchar(100) NOT NULL DEFAULT '0' COMMENT '直播间ID',
  `member_id` varchar(100) NOT NULL DEFAULT '0' COMMENT '主播用户ID',
  `room_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '连麦房间ID',
  `chatMic_user_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '当前房间的连麦 ID，做数据冗余处理',
  `chatMic_user_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '用户连麦记录索引key',
  `online_time` int unsigned NOT NULL DEFAULT '0' COMMENT '在线时长 / 秒',
  `start_time` int unsigned NOT NULL DEFAULT '0' COMMENT '开始观看时间',
  `end_time` int unsigned NOT NULL DEFAULT '0' COMMENT '结束观看时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `live_id` (`live_id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `room_id` (`room_id`) USING BTREE,
  KEY `chatMic_user_key` (`chatMic_user_key`)
) ENGINE=InnoDB AUTO_INCREMENT=5779 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='直播间用户连麦在线记录表';

-- ----------------------------
-- Records of live_chatmic_user_online_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_event_time_log
-- ----------------------------
DROP TABLE IF EXISTS `live_event_time_log`;
CREATE TABLE `live_event_time_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `live_id` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间ID',
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播ID',
  `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '类型 (1. 创建直播 2. 重新开播 3. 暂停)',
  `pay_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '扣除费用',
  `resolution_ratio` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '直播间分辨率',
  `live_length_time` int unsigned NOT NULL DEFAULT '0' COMMENT '直播时长',
  `live_begin_time` int unsigned NOT NULL DEFAULT '0' COMMENT '直播开始时间',
  `live_pause_time` int unsigned NOT NULL DEFAULT '0' COMMENT '直播暂停时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `live_id` (`live_id`),
  KEY `member_id` (`member_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17346 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='直播间操作事件日志表';

-- ----------------------------
-- Records of live_event_time_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_id
-- ----------------------------
DROP TABLE IF EXISTS `live_id`;
CREATE TABLE `live_id` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=550467 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='直播间id大田警方';

-- ----------------------------
-- Records of live_id
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_im_font_color
-- ----------------------------
DROP TABLE IF EXISTS `live_im_font_color`;
CREATE TABLE `live_im_font_color` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播ID',
  `comment_text_color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '评论文字颜色',
  `background_color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '背景颜色',
  `client_type` tinyint NOT NULL DEFAULT '0' COMMENT '涉及到的客户端：1、主播端，2、观看端',
  `status` tinyint unsigned NOT NULL DEFAULT '2' COMMENT '选中状态1选中，2不选中',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `delete_time` int NOT NULL DEFAULT '0' COMMENT '软删除时间',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`),
  KEY `client_type` (`client_type`),
  KEY `status` (`status`),
  KEY `delete_time` (`delete_time`)
) ENGINE=InnoDB AUTO_INCREMENT=299 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='IM评论颜色表';

-- ----------------------------
-- Records of live_im_font_color
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_not_speak
-- ----------------------------
DROP TABLE IF EXISTS `live_not_speak`;
CREATE TABLE `live_not_speak` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播ID',
  `userType` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '用户类型 (1. 主播 2. 管理员 )',
  `os_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '客户端来源(ios、Android、wxapp、h5)',
  `live_id` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间ID',
  `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '禁言用户ID',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '禁言状态( 1. 禁言 2. 取消禁言)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `live_id` (`live_id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=710124 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='主播禁言用户记录表';

-- ----------------------------
-- Records of live_not_speak
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_random_avatars
-- ----------------------------
DROP TABLE IF EXISTS `live_random_avatars`;
CREATE TABLE `live_random_avatars` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `pic_url` varchar(255) DEFAULT NULL COMMENT '头像地址',
  `old_name` varchar(255) DEFAULT '' COMMENT '原名称',
  `create_time` int DEFAULT NULL COMMENT '添加时间',
  `update_time` int DEFAULT NULL COMMENT '更新时间',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态，1开启，0关闭',
  PRIMARY KEY (`id`),
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2030 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='直播随机头像库';

-- ----------------------------
-- Records of live_random_avatars
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_red_envelopes
-- ----------------------------
DROP TABLE IF EXISTS `live_red_envelopes`;
CREATE TABLE `live_red_envelopes` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `live_id` int DEFAULT NULL COMMENT '直播间ID',
  `member_id` int DEFAULT '0' COMMENT '主播ID',
  `create_member_id` int DEFAULT '0' COMMENT '创建红包用户ID',
  `type` int DEFAULT NULL COMMENT '红包类型，1拼手气红包，2普通红包',
  `total_num` int DEFAULT '0' COMMENT '红包总数量',
  `total_amount` decimal(20,2) DEFAULT '0.00' COMMENT '红包总金额，元',
  `single_amount` decimal(10,2) DEFAULT '0.00' COMMENT '单个红包金额，默认0，只有普通红包存在金额',
  `claim_condition` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '领取条件配置',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态，1正常，0失效',
  `create_time` int DEFAULT NULL COMMENT '添加时间',
  `update_time` int DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `live_status_index` (`live_id`,`status`) USING BTREE,
  KEY `member_status` (`member_id`,`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=505 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of live_red_envelopes
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_resolution_ratio_log
-- ----------------------------
DROP TABLE IF EXISTS `live_resolution_ratio_log`;
CREATE TABLE `live_resolution_ratio_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `live_id` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间ID',
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `resolution_ratio` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '480' COMMENT '分辨率',
  `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '类型 (1.切换分辨率)',
  `pay_price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT '预扣费用',
  `balance` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT '当前用户剩余余额',
  `userNumbers` int NOT NULL DEFAULT '0' COMMENT '在线人数',
  `live_length_time` int unsigned NOT NULL DEFAULT '0' COMMENT '直播时长',
  `futureTime` int unsigned NOT NULL DEFAULT '0' COMMENT '未来可直播时长',
  `live_start_time` int unsigned NOT NULL DEFAULT '0' COMMENT '上次切换分辨率时间',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `live_id` (`live_id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=606910 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='直播间切换分辨率日志表';

-- ----------------------------
-- Records of live_resolution_ratio_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_robot_automatic_speech
-- ----------------------------
DROP TABLE IF EXISTS `live_robot_automatic_speech`;
CREATE TABLE `live_robot_automatic_speech` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键 ID',
  `live_id` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '直播间 ID',
  `anchor_id` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '主播 ID',
  `audience_id` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '发言用户/观众ID，如果用户 ID 和主播 ID 一致则是主播',
  `im_groupId` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '直播间 IM 群组 ID',
  `task_id` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '任务 ID',
  `speech_frequency_type` tinyint NOT NULL DEFAULT '1' COMMENT '发言频率类型，1：1～5 秒；2：5～10 秒；3:10～20 秒；4:20～30 秒',
  `speech_source` tinyint NOT NULL DEFAULT '1' COMMENT '发言助手信息来源，1 系统助手库，2 我的助手库',
  `speech_order_type` tinyint NOT NULL DEFAULT '2' COMMENT '发言顺序类型，1 顺序发言；2 随机发言',
  `speech_send_frequency_type` tinyint NOT NULL DEFAULT '2' COMMENT '发言发送频率类型，1 循环发送；2 单次发送',
  `speech_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '发言内容：多条换行处理。存储默认为切割后的 json 数组',
  `speech_content_num` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '发言内容条数',
  `execution_status` tinyint NOT NULL DEFAULT '0' COMMENT '执行状态：0 待执行；1 执行中；2 结束执行',
  `speech_frequency_num` int NOT NULL DEFAULT '0' COMMENT '发言频率次数：数字记录频次',
  `start_time` int NOT NULL DEFAULT '0' COMMENT '发言开始时间',
  `end_time` int NOT NULL DEFAULT '0' COMMENT '发言结束时间',
  `speech_send_num` int unsigned NOT NULL DEFAULT '0' COMMENT '当前任务发言发送数量',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `live_id` (`live_id`),
  KEY `anchor_id` (`anchor_id`),
  KEY `audience_id` (`audience_id`),
  KEY `im_groupId` (`im_groupId`),
  KEY `task_id` (`task_id`),
  KEY `execution_status` (`execution_status`)
) ENGINE=InnoDB AUTO_INCREMENT=209004 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='助手自动发言表';

-- ----------------------------
-- Records of live_robot_automatic_speech
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_robot_comment_imgs
-- ----------------------------
DROP TABLE IF EXISTS `live_robot_comment_imgs`;
CREATE TABLE `live_robot_comment_imgs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `head_img` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '马甲头像',
  `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '图片类型 (1. 用户 2. 风景图)',
  `typeName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '类型名称',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态 (0.删除  1. 正常)',
  `sex` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '性别 (1. 男 2. 女)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  `languages_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '语种 默认1简体中文;2繁体中文;3马来文;4越南文;5英文;6韩文;7日文',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `status` (`status`) USING BTREE,
  KEY `sex` (`sex`) USING BTREE,
  KEY `index_0` (`sex`,`status`,`languages_type`)
) ENGINE=InnoDB AUTO_INCREMENT=15827 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='马甲评论头像配置表';

-- ----------------------------
-- Records of live_robot_comment_imgs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_room_font_size
-- ----------------------------
DROP TABLE IF EXISTS `live_room_font_size`;
CREATE TABLE `live_room_font_size` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增 ID',
  `author_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播 ID',
  `font_size` tinyint NOT NULL DEFAULT '32' COMMENT '字体大小',
  `type` tinyint NOT NULL DEFAULT '2' COMMENT '应用类型，1 主播 APP；2web 观看端',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态：1 正常；0删除',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  `selected` tinyint NOT NULL DEFAULT '2' COMMENT '选中值',
  PRIMARY KEY (`id`),
  KEY `idx_author_id` (`author_id`),
  KEY `idx_author_type` (`author_id`,`type`),
  KEY `idx_status` (`status`),
  KEY `idx_selected` (`selected`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='主播直播间默认字体显示大小';

-- ----------------------------
-- Records of live_room_font_size
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_shortcut
-- ----------------------------
DROP TABLE IF EXISTS `live_shortcut`;
CREATE TABLE `live_shortcut` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '快捷语',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态(0. 删除 1. 正常)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '类型(1. 用户常用语 2. 主播常用语)',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `status` (`status` DESC) USING BTREE,
  KEY `member_id` (`member_id` DESC) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=153338 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='快捷语设置';

-- ----------------------------
-- Records of live_shortcut
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for live_topping
-- ----------------------------
DROP TABLE IF EXISTS `live_topping`;
CREATE TABLE `live_topping` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '主播ID',
  `userType` tinyint(1) NOT NULL COMMENT '用户类型 (1. 主播 2. 管理员 )',
  `os_type` varchar(20) NOT NULL DEFAULT '' COMMENT '客户端来源(ios、Android、wxapp、h5)',
  `live_id` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间ID',
  `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '置顶用户ID',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '置顶状态( 1. 置顶 2. 正常)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `live_id` (`live_id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=79535 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='直播间置顶/正常用户';

-- ----------------------------
-- Records of live_topping
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for login_log
-- ----------------------------
DROP TABLE IF EXISTS `login_log`;
CREATE TABLE `login_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NOT NULL DEFAULT '0' COMMENT '主播id',
  `data_content` text NOT NULL COMMENT '登录信息json',
  `login_time` int NOT NULL DEFAULT '0' COMMENT '登录时间',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `member_id_index` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=154185 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='登录日志';

-- ----------------------------
-- Records of login_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_auth
-- ----------------------------
DROP TABLE IF EXISTS `member_auth`;
CREATE TABLE `member_auth` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `card_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '身份证姓名',
  `card_number` char(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '身份证号',
  `identity_card_face` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '身份证人像面照片',
  `identity_card_back` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '身份证国徽面照片',
  `identity_card_start_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '证件开始日期',
  `identity_card_end_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '证件结束日期',
  `issuing_organ` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '签发机关',
  `face_imgs` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '人脸识别认证(多图，使用逗号隔开)',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '认证状态 (0. 未认证 1. 认证成功 2. 认证失败)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  `qiniu_oem_username` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '七牛云OEM用户名',
  `qiniu_oem_password` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '七牛云OEM密码',
  `qiniu_oem_uid` int unsigned NOT NULL DEFAULT '0' COMMENT '七牛云OEM UID',
  `qiniu_oem_ak` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '七牛云OEM AccessKey',
  `qiniu_oem_sk` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '七牛云OEM SecretKey',
  `init_people_num` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '直播间初始观众数量 (限制：0 - 10万)',
  `business_license` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '营业执照图片',
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '电子邮箱',
  `province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '省',
  `city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '市',
  `area` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '区',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细地址',
  `service_type` int NOT NULL DEFAULT '0' COMMENT '服务类型',
  `sale_type` int NOT NULL DEFAULT '0' COMMENT '销售类型',
  `proxy_business_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '代销企业名称',
  `proxy_business_license` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '代销企业执照',
  `proxy_business_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '代销企业地址',
  `proxy_business_tel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '代销企业电话',
  `business_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '公司名称',
  `business_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '公司税号',
  `business_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '公司注册地址',
  `trade_province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '营业地址-省',
  `trade_city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '营业地址-市',
  `trade_area` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '营业地址-区',
  `trade_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '营业地址-详细地址',
  `communicate_province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '通讯地址-省',
  `communicate_city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '通讯地址-市',
  `communicate_area` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '通讯地址-区',
  `communicate_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '通讯地址-详细地址',
  `category` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '经营类目',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11379 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='主播认证信息';

-- ----------------------------
-- Records of member_auth
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_concern
-- ----------------------------
DROP TABLE IF EXISTS `member_concern`;
CREATE TABLE `member_concern` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL COMMENT '主播id',
  `user_id` int unsigned NOT NULL COMMENT '用户id',
  `status` tinyint unsigned NOT NULL COMMENT '关注状态 1已关注 2已取消',
  `create_time` int unsigned NOT NULL,
  `update_time` int unsigned NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=44121 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='主播关注关系表';

-- ----------------------------
-- Records of member_concern
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_deductions_log
-- ----------------------------
DROP TABLE IF EXISTS `member_deductions_log`;
CREATE TABLE `member_deductions_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `live_id` int unsigned NOT NULL DEFAULT '0' COMMENT '直播间ID',
  `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '类型 (1. 结束直播扣费 2. 切换分辨率扣费)',
  `live_online_time` int unsigned NOT NULL DEFAULT '0' COMMENT '直播时长',
  `order_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '直播费用',
  `pay_status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '扣款状态 (1. 未扣款 2. 已扣款)',
  `remarks` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '是否显示 (1. 显示 2. 隐藏)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `live_time` int unsigned NOT NULL DEFAULT '0' COMMENT '开播时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `live_id` (`live_id`) USING BTREE,
  KEY `pay_status` (`pay_status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=588220 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='直播间费用支出日志';

-- ----------------------------
-- Records of member_deductions_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_info_audit
-- ----------------------------
DROP TABLE IF EXISTS `member_info_audit`;
CREATE TABLE `member_info_audit` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `member_id` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '主播ID',
  `uuid` int unsigned NOT NULL DEFAULT '0' COMMENT '用户uuid (等于腾讯IM ID)',
  `type` int NOT NULL DEFAULT '1' COMMENT '审核类型 1头像 2昵称',
  `from_type` int NOT NULL DEFAULT '1' COMMENT '来源 1主播 2观看端',
  `old_content` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '原内容',
  `content` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '审核内容',
  `expire_time` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '自动审核时间',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态 (0. 未审核 1. 已审核)',
  `auto_audit` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态 (0. 非自动 1. 自动)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  `do_status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '0脚本未处理，1脚本已处理',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`)
) ENGINE=InnoDB AUTO_INCREMENT=21382 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户资料审核表';

-- ----------------------------
-- Records of member_info_audit
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_live_distribute_urls
-- ----------------------------
DROP TABLE IF EXISTS `member_live_distribute_urls`;
CREATE TABLE `member_live_distribute_urls` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `member_id` int DEFAULT NULL COMMENT '用户ID',
  `live_id` int DEFAULT NULL COMMENT '直播间ID',
  `distribute_url` varchar(255) DEFAULT NULL COMMENT '分配域名',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态，1有效，0无效',
  `create_time` int DEFAULT NULL COMMENT '添加时间',
  `update_time` int DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `index_id` (`live_id`,`status`,`member_id`)
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='主播直播间分配地址表';

-- ----------------------------
-- Records of member_live_distribute_urls
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_live_popularity
-- ----------------------------
DROP TABLE IF EXISTS `member_live_popularity`;
CREATE TABLE `member_live_popularity` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '加人气类型 (1. 累计观看人数 2. 累计浏览量 3. 实时在线人数 )',
  `views` int unsigned NOT NULL DEFAULT '0' COMMENT '浏览量倍数',
  `init_people_num` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '50' COMMENT '直播间初始观众数量 (限制：0 - 10万)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=15223 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='加人气设置表';

-- ----------------------------
-- Records of member_live_popularity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_logout_logs
-- ----------------------------
DROP TABLE IF EXISTS `member_logout_logs`;
CREATE TABLE `member_logout_logs` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `member_id` int NOT NULL DEFAULT '0' COMMENT '用户ID',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '操作类型，1注销，2恢复注销',
  `admin_id` int NOT NULL COMMENT '操作人ID',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '添加时间',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='主播注销日志表';

-- ----------------------------
-- Records of member_logout_logs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_notice_extend
-- ----------------------------
DROP TABLE IF EXISTS `member_notice_extend`;
CREATE TABLE `member_notice_extend` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `notice_id` int NOT NULL DEFAULT '0' COMMENT '主表ID',
  `complaint_id` int NOT NULL DEFAULT '0' COMMENT '投诉ID',
  `is_read` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否已读(1:已读，0:未读)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态 (0.删除  1. 正常)',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `notice_id` (`notice_id`) USING BTREE,
  KEY `complaint_id` (`complaint_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='用户消息通知子表';

-- ----------------------------
-- Records of member_notice_extend
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_orders
-- ----------------------------
DROP TABLE IF EXISTS `member_orders`;
CREATE TABLE `member_orders` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `order_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '订单号 等同于微信 out_trade_no',
  `transaction_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信商户 交易订单号',
  `prepay_id` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信 预下单 编号',
  `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '实际支付人ID',
  `pid` int NOT NULL DEFAULT '0' COMMENT '父级ID',
  `pay_num` int unsigned NOT NULL DEFAULT '1' COMMENT '购买数量',
  `order_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单价格',
  `pay_status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '支付状态 (1. 未支付 2.已支付(交易完成),3微信 用户已付款,但未到账 )',
  `pay_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '实际支付金额',
  `type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '支付类型  1充值 2扣除',
  `pay_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '支付方式 (1. 微信支付  2. 支付宝支付 3, 苹果内购 4, 线下充值)',
  `invoice_status` int unsigned NOT NULL DEFAULT '0' COMMENT '开票状态 0 未开票 1已开票',
  `vip_order_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'vip_order_id 表ID',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '订单备注',
  `pay_time` int unsigned NOT NULL DEFAULT '0' COMMENT '支付时间',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `pay_status` (`pay_status`) USING BTREE,
  KEY `order_no` (`order_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10664410 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='流量余额订单表';

-- ----------------------------
-- Records of member_orders
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_red_envelopes
-- ----------------------------
DROP TABLE IF EXISTS `member_red_envelopes`;
CREATE TABLE `member_red_envelopes` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `rand_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '红包唯一码',
  `live_id` int DEFAULT NULL COMMENT '直播间ID',
  `member_id` int DEFAULT NULL COMMENT '用户ID',
  `amount` decimal(10,2) DEFAULT NULL COMMENT '红包金额',
  `red_id` int DEFAULT NULL COMMENT '红包ID',
  `type` int DEFAULT '0' COMMENT '红包类型',
  `status` tinyint DEFAULT '1' COMMENT '状态，1正常，0失效',
  `is_exchange` tinyint(1) DEFAULT '0' COMMENT '兑换状态，1已兑换，0未兑换',
  `create_time` int DEFAULT NULL COMMENT '创建时间',
  `update_time` int DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `live_member_red_status` (`live_id`,`member_id`,`red_id`,`status`) USING BTREE,
  KEY `member_status` (`member_id`,`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2807 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of member_red_envelopes
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_resolution_ratio
-- ----------------------------
DROP TABLE IF EXISTS `member_resolution_ratio`;
CREATE TABLE `member_resolution_ratio` (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NOT NULL COMMENT '主播id',
  `ratio_one` varchar(150) NOT NULL DEFAULT '0' COMMENT '480对应码率',
  `ratio_tow` varchar(150) NOT NULL DEFAULT '0' COMMENT '720对应码率',
  `ratio_three` varchar(150) NOT NULL DEFAULT '0' COMMENT '1080对应码率',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1正常 0删除',
  `create_time` int NOT NULL COMMENT '创建时间',
  `update_time` int NOT NULL COMMENT '修改时间',
  `is_exposure` tinyint(1) DEFAULT '2' COMMENT '是否开启曝光度，1开启，2不开启',
  `exposure_num` float DEFAULT '0' COMMENT '曝光度值',
  `push_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '推流服务商 0火山；1 腾讯',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of member_resolution_ratio
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_tags_color
-- ----------------------------
DROP TABLE IF EXISTS `member_tags_color`;
CREATE TABLE `member_tags_color` (
  `id` int NOT NULL AUTO_INCREMENT,
  `background_color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '背景颜色',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态 (1. 正常 0. 删除)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='标签颜色配置表';

-- ----------------------------
-- Records of member_tags_color
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_third_binding
-- ----------------------------
DROP TABLE IF EXISTS `member_third_binding`;
CREATE TABLE `member_third_binding` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `member_id` int DEFAULT '0' COMMENT '用户ID',
  `type` tinyint NOT NULL DEFAULT '1' COMMENT '绑定类型 1=》手机号',
  `content` varchar(255) NOT NULL DEFAULT '' COMMENT '绑定内容',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '绑定状态 1正常 2解绑',
  `extra` varchar(255) NOT NULL DEFAULT '' COMMENT '其他冗余状态',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `idx_memberId` (`member_id`),
  KEY `idx_content` (`content`)
) ENGINE=InnoDB AUTO_INCREMENT=4271 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of member_third_binding
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_tips
-- ----------------------------
DROP TABLE IF EXISTS `member_tips`;
CREATE TABLE `member_tips` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `member_id` int NOT NULL DEFAULT '0' COMMENT '主播ID',
  `type` int NOT NULL DEFAULT '2' COMMENT '提示类型，1完善资质认证提示',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  `end_time` int NOT NULL DEFAULT '0' COMMENT '过期时间',
  `latest_alert_time` int NOT NULL DEFAULT '0' COMMENT '最新弹出时间',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态(0未补充 1. 补充完成)',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6143 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='主播信息提示状态表';

-- ----------------------------
-- Records of member_tips
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_vip_class
-- ----------------------------
DROP TABLE IF EXISTS `member_vip_class`;
CREATE TABLE `member_vip_class` (
  `id` int NOT NULL AUTO_INCREMENT,
  `level_id` int unsigned NOT NULL DEFAULT '1' COMMENT '会员等级ID',
  `vip_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'VIP名称',
  `vip_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'VIP金额',
  `vip_price_ios` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'VIP金额(IOS内购价格)',
  `product_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'IOS内购产品ID',
  `vip_img_url` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'VIP缩略图',
  `desc` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'VIP简介',
  `vip_over_time` int unsigned NOT NULL DEFAULT '0' COMMENT 'VIP有效时长(单位: 天)',
  `is_apple_pay` tinyint unsigned NOT NULL DEFAULT '1' COMMENT 'IOS是否可支付 (0. 不支持内购 1. 支持内购)',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态 (0. 禁用 1. 正常)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  `style_type` tinyint(1) DEFAULT '1' COMMENT '类型，1普通，2专享',
  `sort` int NOT NULL DEFAULT '0' COMMENT '排序',
  `vip_day_price_ios` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '平均每天消费',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `id` (`id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='VIP价格分类表';

-- ----------------------------
-- Records of member_vip_class
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_vip_expired
-- ----------------------------
DROP TABLE IF EXISTS `member_vip_expired`;
CREATE TABLE `member_vip_expired` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `member_id` int unsigned NOT NULL COMMENT '会员ID',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11027 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of member_vip_expired
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_vip_level
-- ----------------------------
DROP TABLE IF EXISTS `member_vip_level`;
CREATE TABLE `member_vip_level` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'VIP等级标题',
  `alias_title` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '别名',
  `desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'VIP等级描述',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '默认展示等级（0. 禁用 1. 正常）',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='VIP等级表';

-- ----------------------------
-- Records of member_vip_level
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_vip_orders
-- ----------------------------
DROP TABLE IF EXISTS `member_vip_orders`;
CREATE TABLE `member_vip_orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `vip_order_sn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'VIP订单号',
  `transaction_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信商户 交易订单号',
  `prepay_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信商户 交易订单号',
  `user_id` int unsigned NOT NULL DEFAULT '0' COMMENT '实际支付人ID',
  `level_id` int DEFAULT NULL,
  `vip_class_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'VIP充值类型ID',
  `vip_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '充值金额',
  `pay_type` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '支付类型 (1. 微信 2. 支付宝 3. 苹果内购)',
  `pay_status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '支付状态 (1. 待支付 2. 支付成功)',
  `pay_order_num` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方支付流水号',
  `pay_order_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方支付状态',
  `pid` int unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '修改时间',
  `vip_end_timed` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'VIP到期时间',
  `pay_time` int unsigned NOT NULL DEFAULT '0' COMMENT '支付时间',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态 1正常 2已退款',
  `order_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '专属类型，1普通，2专属',
  `refund_market` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '退款备注',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `vip_end_time_vip_type` (`vip_end_timed`,`level_id`) USING BTREE,
  KEY `vip_order_sn` (`vip_order_sn`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10666863 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='VIP充值订单表';

-- ----------------------------
-- Records of member_vip_orders
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_wallet
-- ----------------------------
DROP TABLE IF EXISTS `member_wallet`;
CREATE TABLE `member_wallet` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '钱包ID',
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '钱包名称',
  `type` tinyint NOT NULL DEFAULT '0' COMMENT '钱包类型. 1余额',
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '余额',
  `frozen_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '冻结金额',
  `total_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '累计金额',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '是否有效 0无效 1有效',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `idx_member_id_type` (`member_id`,`type`),
  KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户钱包表';

-- ----------------------------
-- Records of member_wallet
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for member_watch_live_setting
-- ----------------------------
DROP TABLE IF EXISTS `member_watch_live_setting`;
CREATE TABLE `member_watch_live_setting` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `small_screen_state` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '小窗播放状态1开启，0关闭',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE COMMENT '用户ID'
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='观看端-直播播放设置';

-- ----------------------------
-- Records of member_watch_live_setting
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for migrations
-- ----------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `version` bigint NOT NULL,
  `migration_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `end_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `breakpoint` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=COMPACT;

-- ----------------------------
-- Records of migrations
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mini_program_configs
-- ----------------------------
DROP TABLE IF EXISTS `mini_program_configs`;
CREATE TABLE `mini_program_configs` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
  `appid` varchar(50) NOT NULL COMMENT 'APPID',
  `app_secret` varchar(255) NOT NULL COMMENT 'APPSECRET加密后密文',
  `salt` varchar(50) NOT NULL DEFAULT '' COMMENT '加密参数',
  `wx_app_user_name` varchar(100) NOT NULL DEFAULT '' COMMENT '小程序原始名称',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态，1正常，0关闭',
  `is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '默认状态，1默认，0 普通',
  `is_reserve` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否公用，0不公用，1公用',
  `subscribe_template_id` varchar(255) NOT NULL DEFAULT '' COMMENT '订阅模版ID',
  `kf_callback_config` varchar(255) NOT NULL DEFAULT '' COMMENT '客服回调配置',
  `allocationed_num` int NOT NULL DEFAULT '0' COMMENT '已分配数量',
  `max_allocation_num` int NOT NULL DEFAULT '0' COMMENT '最多可分配限额',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  `avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '小程序头像',
  `allocation_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '分配类型，1自动，0手动',
  `is_exclusive` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否专属，1专属，0不专属',
  `open_appid` varchar(50) DEFAULT '' COMMENT '开放平台ID',
  PRIMARY KEY (`id`),
  KEY `appid` (`appid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=374 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='微信小程序配置表';

-- ----------------------------
-- Records of mini_program_configs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mini_program_exclusive_change_process_logs
-- ----------------------------
DROP TABLE IF EXISTS `mini_program_exclusive_change_process_logs`;
CREATE TABLE `mini_program_exclusive_change_process_logs` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `log_id` int DEFAULT NULL COMMENT '变更数据ID',
  `member_id` int DEFAULT NULL COMMENT '主播ID',
  `status` tinyint(1) DEFAULT '0' COMMENT '进度状态，0提交，1通过，2拒绝',
  `content` varchar(255) DEFAULT '' COMMENT '状态名称',
  `create_time` int DEFAULT NULL COMMENT '创建时间',
  `refuse_reason` varchar(255) DEFAULT '' COMMENT '拒绝理由',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE COMMENT 'member_id'
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='专属小程序变更进度表';

-- ----------------------------
-- Records of mini_program_exclusive_change_process_logs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mini_program_exclusive_custom_posters
-- ----------------------------
DROP TABLE IF EXISTS `mini_program_exclusive_custom_posters`;
CREATE TABLE `mini_program_exclusive_custom_posters` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `poster_img` varchar(255) DEFAULT NULL COMMENT '海报图片',
  `member_id` int DEFAULT NULL COMMENT '主播ID',
  `create_time` int DEFAULT NULL COMMENT '创建时间',
  `update_time` int DEFAULT NULL COMMENT '更新时间',
  `status` tinyint(1) DEFAULT '0' COMMENT '状态，1显示，0提交审核，2拒绝',
  `refuse_content` varchar(255) DEFAULT NULL COMMENT '拒绝理由',
  `audit_time` int DEFAULT NULL COMMENT '拒绝时间',
  `is_del` tinyint(1) DEFAULT '0' COMMENT '是否删除，0未删除，1已删除',
  `sort` tinyint(1) DEFAULT '0' COMMENT '海报排序',
  `relation_change_id` int DEFAULT '0' COMMENT '关联变更ID',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`) USING BTREE COMMENT 'member_id'
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='主播专享海报表';

-- ----------------------------
-- Records of mini_program_exclusive_custom_posters
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for open_card_statistics
-- ----------------------------
DROP TABLE IF EXISTS `open_card_statistics`;
CREATE TABLE `open_card_statistics` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '唯一标识',
  `sales_date` date DEFAULT NULL COMMENT '销售日期',
  `monthly_cards_sold` int NOT NULL DEFAULT '0' COMMENT '月卡数',
  `season_cards_sold` int NOT NULL DEFAULT '0' COMMENT '季卡',
  `yearly_cards_sold` int NOT NULL DEFAULT '0' COMMENT '年卡数',
  `cards_returned` int NOT NULL DEFAULT '0' COMMENT '退卡数',
  `monthly_card_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '月卡额',
  `season_card_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '季卡额',
  `yearly_card_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '年卡额',
  `return_card_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '退卡额',
  `total_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '开卡总金额',
  `total_flow_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '流量总额',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `sales_date_idx` (`sales_date`)
) ENGINE=InnoDB AUTO_INCREMENT=939 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='开卡数据统计';

-- ----------------------------
-- Records of open_card_statistics
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for order_invoice
-- ----------------------------
DROP TABLE IF EXISTS `order_invoice`;
CREATE TABLE `order_invoice` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  `order_ids` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'order ids',
  `invoice_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '发票类型  1企业 2个人',
  `invoice_title` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '	发票抬头',
  `tax_num` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '税号',
  `invoice_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '发票 简介',
  `sum_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '发票金额',
  `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收票人 姓名',
  `mobile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收票人 手机号',
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收票人 邮箱',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态(0. 删除 1. 审核中,2开票完成)',
  `mobile_send_status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '短信推送状态 0未推送 1推送成功',
  `email_send_status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '邮箱推送状态 0未推送 1推送成功',
  `create_time` int unsigned NOT NULL,
  `update_time` int unsigned NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='订单发票表';

-- ----------------------------
-- Records of order_invoice
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for platform_log
-- ----------------------------
DROP TABLE IF EXISTS `platform_log`;
CREATE TABLE `platform_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NOT NULL COMMENT '主播id',
  `content` varchar(255) NOT NULL COMMENT '操作内容',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1405 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='平台操作日志';

-- ----------------------------
-- Records of platform_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for refund_order
-- ----------------------------
DROP TABLE IF EXISTS `refund_order`;
CREATE TABLE `refund_order` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL COMMENT '用户id',
  `vip_order_id` int unsigned NOT NULL DEFAULT '0' COMMENT ' vip订单记录表id',
  `transaction_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信订单号',
  `go_back_type` int unsigned NOT NULL COMMENT '退款类型 1退月卡 2退年卡',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '1正常 退款成功',
  `create_time` int unsigned NOT NULL COMMENT '创建时间',
  `update_time` int unsigned NOT NULL,
  `admin_id` int NOT NULL DEFAULT '0' COMMENT '操作人',
  `refund_market` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '退款备注',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=299 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='退款申请表';

-- ----------------------------
-- Records of refund_order
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sensitive_words
-- ----------------------------
DROP TABLE IF EXISTS `sensitive_words`;
CREATE TABLE `sensitive_words` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID (0=系统添加)',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '敏感词汇',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态 (0. 删除  1. 正常)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE,
  KEY `title` (`title`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=124801 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='敏感词汇表';

-- ----------------------------
-- Records of sensitive_words
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for short_chain_member_allocations
-- ----------------------------
DROP TABLE IF EXISTS `short_chain_member_allocations`;
CREATE TABLE `short_chain_member_allocations` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `member_id` int unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `short_chain_id` int NOT NULL COMMENT '短链账户ID',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态，1开启，2关闭',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `short_chain_id` (`short_chain_id`) USING BTREE,
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of short_chain_member_allocations
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_block_posts
-- ----------------------------
DROP TABLE IF EXISTS `sns_block_posts`;
CREATE TABLE `sns_block_posts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '用户ID关联',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '1正常 0解除',
  `fid` varchar(50) NOT NULL DEFAULT '0' COMMENT '被屏蔽的用户id',
  `posts_id` int unsigned NOT NULL DEFAULT '0' COMMENT '帖子id',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_member_id` (`member_id`),
  KEY `idx_fid` (`fid`),
  KEY `idx_posts_id` (`posts_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='屏蔽作者帖子';

-- ----------------------------
-- Records of sns_block_posts
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_complaint
-- ----------------------------
DROP TABLE IF EXISTS `sns_complaint`;
CREATE TABLE `sns_complaint` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `type_id` int unsigned NOT NULL DEFAULT '0' COMMENT '投诉类型',
  `member_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '投诉人用户ID',
  `complaint_type` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '投诉类型：1 投诉帖子，2 投诉主播',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '投诉内容',
  `complaint_credentials` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '上传截图 (使用逗号分割)',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '投诉状态 （1. 已提交，2，主动撤诉 3. 平台处理）',
  `judgment_status` tinyint NOT NULL DEFAULT '0' COMMENT '平台判定状态（0未处理，1无效，2有效）',
  `fid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '被投诉人ID',
  `posts_id` int unsigned NOT NULL DEFAULT '0' COMMENT '帖子id',
  `operator_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '后台操作人\n',
  `process_result` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '处理结果',
  `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '备注说明',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  `process_time` int unsigned NOT NULL DEFAULT '0' COMMENT '处理时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `member_id` (`member_id`),
  KEY `fid` (`fid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='客户投诉表';

-- ----------------------------
-- Records of sns_complaint
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_follow
-- ----------------------------
DROP TABLE IF EXISTS `sns_follow`;
CREATE TABLE `sns_follow` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '用户ID关联',
  `fid` varchar(50) NOT NULL DEFAULT '0' COMMENT '被关注的人',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '认证状态 (1.删除 1.正常)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户关注表';

-- ----------------------------
-- Records of sns_follow
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_posts
-- ----------------------------
DROP TABLE IF EXISTS `sns_posts`;
CREATE TABLE `sns_posts` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '用户ID关联',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '帖子文字内容',
  `images` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '帖子图片内容',
  `video` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '帖子视频内容',
  `trans_video` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT '转码后的视频',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态 (0.自己删除 1.正常 2.仅自己可见，3系统删除)',
  `pin` tinyint NOT NULL DEFAULT '0' COMMENT '是否置顶 0否  >1是',
  `views_nums` int unsigned NOT NULL DEFAULT '0' COMMENT '浏览量',
  `share_nums` int unsigned NOT NULL DEFAULT '0' COMMENT '分享量',
  `comment_nums` int unsigned NOT NULL DEFAULT '0' COMMENT '评论量',
  `favorites_nums` int unsigned NOT NULL DEFAULT '0' COMMENT '收藏量',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  `ip` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'ip',
  `ip_country` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'IP所在国家',
  `ip_province` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT 'IP所属省',
  `ip_city` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT 'IP所属市',
  `ip_area` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT 'IP所属区',
  `baby_switch` tinyint NOT NULL DEFAULT '0' COMMENT '发布宝贝开关 0 关闭 1 开启。默认关',
  PRIMARY KEY (`id`),
  KEY `idx_member_id` (`member_id`),
  KEY `idx_create_time` (`create_time`),
  KEY `idx_update_time` (`update_time`) USING BTREE,
  KEY `ids_video` (`video`)
) ENGINE=InnoDB AUTO_INCREMENT=150 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='帖子';

-- ----------------------------
-- Records of sns_posts
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_posts_draft
-- ----------------------------
DROP TABLE IF EXISTS `sns_posts_draft`;
CREATE TABLE `sns_posts_draft` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '用户ID关联',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '帖子文字内容',
  `images` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '帖子图片内容',
  `video` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '帖子视频内容',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '认证状态 (0.删除 1.正常)',
  `rule` tinyint NOT NULL DEFAULT '1',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  `baby_switch` tinyint NOT NULL DEFAULT '0' COMMENT '发布宝贝开关 0 关闭 1 开启。默认关',
  `product_extra_material_ids` text COMMENT '帖子宝贝额外信息id',
  PRIMARY KEY (`id`),
  KEY `idx_member_id` (`member_id`),
  KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='帖子草稿箱';

-- ----------------------------
-- Records of sns_posts_draft
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_posts_like
-- ----------------------------
DROP TABLE IF EXISTS `sns_posts_like`;
CREATE TABLE `sns_posts_like` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '用户ID关联',
  `fid` varchar(50) NOT NULL DEFAULT '0' COMMENT '被点赞的帖子所属人',
  `posts_id` int unsigned NOT NULL DEFAULT '0' COMMENT '帖子id',
  `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '(0.自己删除 1.正常，2系统删除)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `idx_member_id` (`member_id`),
  KEY `idx_posts_id` (`posts_id`),
  KEY `idx_update_time` (`update_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='帖子点赞表';

-- ----------------------------
-- Records of sns_posts_like
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_product_extra_material
-- ----------------------------
DROP TABLE IF EXISTS `sns_product_extra_material`;
CREATE TABLE `sns_product_extra_material` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自增 ID',
  `member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '主播ID',
  `posts_id` int NOT NULL DEFAULT '0' COMMENT '帖子id',
  `material_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '宝贝额外项ID',
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态 0 废弃 1 正常',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `member_id` (`member_id`),
  KEY `posts_id` (`posts_id`),
  KEY `material_id` (`material_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=555 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='帖子宝贝额外材质 id 表';

-- ----------------------------
-- Records of sns_product_extra_material
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_search_history
-- ----------------------------
DROP TABLE IF EXISTS `sns_search_history`;
CREATE TABLE `sns_search_history` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '用户ID关联',
  `content` varchar(255) NOT NULL DEFAULT '0' COMMENT '搜索内容',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '1正常 0删除',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_member_id` (`member_id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='搜索历史';

-- ----------------------------
-- Records of sns_search_history
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_video_trans
-- ----------------------------
DROP TABLE IF EXISTS `sns_video_trans`;
CREATE TABLE `sns_video_trans` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `source_video` varchar(150) NOT NULL DEFAULT '' COMMENT '原视频key',
  `trans_video` varchar(150) NOT NULL DEFAULT '' COMMENT '转码后的视频key',
  `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态 (0. 未处理 1. 已同步 2丢弃)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `source_video` (`source_video`) USING BTREE,
  KEY `trans_video` (`trans_video`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT COMMENT='视频转码表';

-- ----------------------------
-- Records of sns_video_trans
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sns_wechat
-- ----------------------------
DROP TABLE IF EXISTS `sns_wechat`;
CREATE TABLE `sns_wechat` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `member_id` varchar(50) NOT NULL DEFAULT '0' COMMENT '用户ID关联',
  `wechat` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '用户ID微笑',
  `status` tinyint unsigned NOT NULL DEFAULT '2' COMMENT '状态 (0.删除 1.正常 2，隐藏)',
  `create_time` int unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `idx_member_id` (`member_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='联系微信';

-- ----------------------------
-- Records of sns_wechat
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for update_status
-- ----------------------------
DROP TABLE IF EXISTS `update_status`;
CREATE TABLE `update_status` (
  `id` int NOT NULL AUTO_INCREMENT,
  `last_processed_id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of update_status
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for view_anchor_applications
-- ----------------------------
DROP TABLE IF EXISTS `view_anchor_applications`;
CREATE TABLE `view_anchor_applications` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `complaint_id` int NOT NULL DEFAULT '0' COMMENT '投诉ID',
  `real_name` varchar(20) NOT NULL DEFAULT '' COMMENT '真实姓名',
  `card_number` varchar(50) NOT NULL DEFAULT '' COMMENT '身份证号',
  `mobile` varchar(15) NOT NULL DEFAULT '' COMMENT '手机号',
  `apply_type` int NOT NULL DEFAULT '0' COMMENT '申请类型，1诉讼、2仲裁、3举报、4投诉、5报案、6其他',
  `apply_unit` varchar(255) NOT NULL DEFAULT '' COMMENT '机关单位',
  `apply_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '申请理由',
  `user_id` int NOT NULL DEFAULT '0' COMMENT '申请人ID',
  `qualification_pic` varchar(255) NOT NULL DEFAULT '' COMMENT '资质图片',
  `member_id` int NOT NULL DEFAULT '0' COMMENT '主播ID',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态，-2 已废弃，-1签章已失效，0未签章，1正在审核，2已通过，3已拒绝，4签章中',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  `is_sign` tinyint(1) NOT NULL DEFAULT '2' COMMENT '验签结果，1已签章，2未签章',
  `fail_reason` varchar(255) NOT NULL DEFAULT '' COMMENT '被拒理由',
  `audit_time` int NOT NULL DEFAULT '0' COMMENT '申请时间',
  PRIMARY KEY (`id`),
  KEY `complaint_id` (`complaint_id`),
  KEY `member_id` (`member_id`) USING BTREE,
  KEY `user_id` (`user_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=538 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='查看主播资质申请表';

-- ----------------------------
-- Records of view_anchor_applications
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wx_public_configs
-- ----------------------------
DROP TABLE IF EXISTS `wx_public_configs`;
CREATE TABLE `wx_public_configs` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '公众号名称',
  `appid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'APPID',
  `app_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '秘钥',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态，1开启，2不开启',
  `is_use` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否使用，1是，2否',
  `create_time` int NOT NULL DEFAULT '0' COMMENT '添加时间',
  `update_time` int NOT NULL DEFAULT '0' COMMENT '更新时间',
  `callback_config` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '回调验证配置',
  `is_pre` tinyint(1) NOT NULL DEFAULT '2' COMMENT '是否是预发环境，1是，2否',
  `authorized_domain_url_id` int unsigned NOT NULL DEFAULT '0' COMMENT '授权域名ID',
  `is_support_base_url` tinyint unsigned NOT NULL DEFAULT '2' COMMENT '是否支持基域名分配，1支持，2不支持',
  `is_support_platform` tinyint unsigned NOT NULL DEFAULT '2' COMMENT '是否绑定开放平台：1支持；2不支持',
  PRIMARY KEY (`id`),
  KEY `status` (`status`),
  KEY `is_use` (`is_use`),
  KEY `is_pre` (`is_pre`) USING BTREE,
  KEY `appid` (`appid`) USING BTREE COMMENT 'APPID'
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of wx_public_configs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Procedure structure for BatchUpdateQrcode
-- ----------------------------
DROP PROCEDURE IF EXISTS `BatchUpdateQrcode`;
delimiter ;;
CREATE PROCEDURE `BatchUpdateQrcode`()
BEGIN
    DECLARE done INT DEFAULT FALSE;
    DECLARE batch_size INT DEFAULT 1000;
    DECLARE max_updates INT DEFAULT 50000; -- Maximum number of records to update
    DECLARE updated_count INT DEFAULT 0;   -- Counter for updated records
    DECLARE min_id INT;
    DECLARE max_id INT;
    DECLARE current_id INT;

    -- Get the last processed ID from the status table
    SELECT last_processed_id INTO current_id FROM update_status WHERE id = 1;

    -- Get the max ID for the records to update
    SELECT MAX(id) INTO max_id FROM anchor_invitation WHERE create_time > UNIX_TIMESTAMP('2024-01-31') and  create_time < UNIX_TIMESTAMP('2024-05-31');

    -- Start the transaction
    START TRANSACTION;

    WHILE NOT done DO
        -- Update in batches
        UPDATE anchor_invitation
        SET qrcode = ''
        WHERE  create_time > UNIX_TIMESTAMP('2024-01-31') and  create_time < UNIX_TIMESTAMP('2024-05-31') AND id > current_id AND id <= current_id + batch_size;

        -- Update the count of modified records
        SET updated_count = updated_count + ROW_COUNT();

        -- Move to the next batch
        SET current_id = current_id + batch_size;

        -- Update the last processed ID in the status table
        UPDATE update_status SET last_processed_id = current_id WHERE id = 1;
     --   COMMIT;
     --   START TRANSACTION;

        -- Check if we are done
        IF current_id > max_id OR updated_count >= max_updates THEN
            SET done = TRUE;
        END IF;
    END WHILE;

    -- Commit the transaction
    COMMIT;
END
;;
delimiter ;

SET FOREIGN_KEY_CHECKS = 1;
